
********************************************************************************************************
*THIS DO-FILE REPLICATES TABLES 7 IN:                                                  			   
* PATRICIA FUNK: 							                       	
* "HOW ACCURATE ARE SURVEYED PREFERENCES FOR PUBLIC POLICIES? EVIDENCE FROM
* A UNIQUE INSTITUTIONAL SETUP"                                                                                         
********************************************************************************************************

global data ="[your path]"
global results ="[your path]"

clear all
set more off
set matsize 2000


use "$data\canton_data", clear 


tab (votenr), gen(aa) 
tab(year), gen(yy)

reg absyesrep_yesrealc perc_prot age45 edu_neu aa* yy*  [weight= surveyed_vote], cluster(canton)
outreg2 using "$results\tab7.xls", keep(perc_prot age45 edu_neu) se 

reg absyesrep_yesrealc perc_prot age45 edu_neu  nongerman incomeip aa* yy* [weight= surveyed_vote] , cluster(canton)
outreg2 perc_prot age45 edu_neu  nongerman incomeip  using "$results\tab7.xls", keep(perc_prot age45 edu_neu  nongerman incomeip) se append

reg absyesrep_yesrealc perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt  aa* yy* [weight= surveyed_vote] , cluster(canton)
outreg2 using "$results\tab7.xls", keep(perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt) se append

reg absyesrep_yesrealc perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt  spsi  aa* yy* [weight= surveyed_vote] , cluster(canton) 
outreg2 using "$results\tab7.xls", keep(perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt  spsi) se append

reg absyesrep_yesrealc perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt  cvpi  aa* yy* [weight= surveyed_vote] , cluster(canton) 
outreg2 using "$results\tab7.xls", keep(perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt  cvpi) se append

reg absyesrep_yesrealc perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt   fdpi   aa* yy* [weight= surveyed_vote] , cluster(canton) 
outreg2  using "$results\tab7.xls", keep(perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt   fdpi) se append

reg absyesrep_yesrealc perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt svpi   aa* yy* [weight= surveyed_vote] , cluster(canton) 
outreg2 using "$results\tab7.xls", keep(perc_prot age45 edu_neu  nongerman incomeip perc_rur pop_pt svpi) se append


